Skip to content

[OpenApi] Do not use output for request body#4213

Merged
soyuka merged 2 commits into
api-platform:2.6from
alanpoulain:fix/open-api-output-request-body
Apr 25, 2021
Merged

[OpenApi] Do not use output for request body#4213
soyuka merged 2 commits into
api-platform:2.6from
alanpoulain:fix/open-api-output-request-body

Conversation

@alanpoulain

Copy link
Copy Markdown
Member
Q A
Branch? 2.6
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fixes #4212
License MIT
Doc PR N/A

Since the $schema object was reused, the output DTO $ref was not overwritten:

if (!isset($schema['$ref']) && !isset($schema['type'])) {

@guilliamxavier

guilliamxavier commented Apr 14, 2021

Copy link
Copy Markdown
Contributor

Thanks, note that currently it doesn't fix the second part of the ticket, namely that the generated schema uses jsonld even for the other media types (json, xml...); but maybe we should create a separate issue/PR?

@alanpoulain

Copy link
Copy Markdown
Member Author

@guilliamxavier Yes another PR would be better (and another issue, I didn't see the second part).

@guilliamxavier

Copy link
Copy Markdown
Contributor

I opened #4215, note that the fix depends on this PR

@soyuka soyuka force-pushed the fix/open-api-output-request-body branch from 426f7eb to 411a09c Compare April 25, 2021 21:24
@soyuka soyuka merged commit cd4b81c into api-platform:2.6 Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After upgrade to 2.6.4 - swagger "Request body schema" uses defined "output dto"

3 participants